var indoorMap = false;


map.addEventListener('zoom', function () {
    if (map.getZoom() >= 19 && !indoorMap) {
        console.log("开启室内地图");
        indoorMap = true;
        floorControl.show();
    } else if (map.getZoom() < 19 && indoorMap) {
        console.log("关闭室内地图");
        indoorMap = false;
        floorControl.hide();
    }
});
initIndoorMap();

function initIndoorMap() {
    layerManager.addLayer(mapSource.F1.url, mapSource.F1.layer, "F1");
    layerManager.addLayer(mapSource.F2.url, mapSource.F2.layer, "F2");
    layerManager.addLayer(mapSource.F3.url, mapSource.F3.layer, "F3");
    layerManager.addLayer(mapSource.F4.url, mapSource.F4.layer, "F4");
    layerManager.addLayer(mapSource.F5.url, mapSource.F5.layer, "F5");
}